//
//  PersonSetHeadImgTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/8/13.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "PersonSetHeadImgTableViewCell.h"

@implementation PersonSetHeadImgTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    return self;
}

-(void)creatUI{
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.img];
}

-(UILabel *)titleLabel
{
    if(_titleLabel == nil)
    {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 17.5, 100, 20)];
        _titleLabel.font = font(15);
        _titleLabel.textColor = SFM51;
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.text = @"图像";
    }
    return _titleLabel;
}

-(UIImageView *)img
{
    if(_img == nil)
    {
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH - 70, 12.5, 30, 30)];
        _img.contentMode = UIViewContentModeScaleAspectFill;
        _img.layer.cornerRadius = 15;
        _img.clipsToBounds = YES;
    }
    return _img;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
